package com.liveneo.adapter.base.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.liveneo.adapter.base.entity.PrpmLossConfirm;
import com.liveneo.adapter.base.entity.PrpmLossItem;
import com.liveneo.adapter.mobile.model.request.LossItemRequest;

public interface PrpmLossItemMapper {
    int deleteByPrimaryKey(String lossItemId);

    int insert(PrpmLossItem record);

    int insertSelective(PrpmLossItem record);

    PrpmLossItem selectByPrimaryKey(String lossItemId);

    int updateByPrimaryKeySelective(PrpmLossItem record);

    int updateByPrimaryKey(PrpmLossItem record);

    List<PrpmLossItem> selectByPhoneNo(@Param("phoneNo") String phoneNo);

    List<PrpmLossItem> selectByCaseInfoId(String uuid);

    List<PrpmLossItem> selectByCaseNo(String caseNo);
    
    List<PrpmLossItem> selectByCaseId4C(Map<String,String> map);
    
    List<PrpmLossItem> selectByCaseNo4C(Map<String,String> map);
    
    List<PrpmLossItem> selectByCaseId4AB(Map<String,String> map);
    
    List<PrpmLossItem> selectByCaseNo4AB(Map<String,String> map);
    
    List<String> getLossUuidByCaseNo(String caseNo);

    PrpmLossItem selectByCaseNoLossId(Map<String,String> params);

    int deleteByCaseNo(String caseNo);

    int insertList(List<PrpmLossItem> lossItemList);

    int updateLossItemByUuid(PrpmLossItem lossItem);
    
    int updateLossStatusByUuidList(PrpmLossItem lossItem);

    List<PrpmLossItem> selectByPhoneNoFlag(String phoneNo);

    List<PrpmLossItem> getLossItemByCaseUuids(List<String> caseUuids);

    List<PrpmLossItem> getLossItemByCaseUuidsAndLossId(String caseNo);

    List<PrpmLossItem> getLossItemByPhoneNoAndLossId(Map<String,String> params);
    
    List<PrpmLossItem> getLossItemByCaseUuidsAndPhoneNo(Map<String,String> params);

    List<PrpmLossItem> selectByBean(String caseNo);

    List<PrpmLossItem> getLossItemByUuids(List<String> uuids);

    List<PrpmLossItem> getLossListByUserCodeOrLastTwo(@Param("userCode") String userCode,
            @Param("lastTwo") String lastTwo,@Param("source") String source);

    PrpmLossItem selectByCaseNoLossIdUuid(Map<String,String> params);

    int insertBatch(List<PrpmLossConfirm> list);

    List<PrpmLossItem> selectByRequest(LossItemRequest request);

    List<PrpmLossItem> getLossItemByUserCode(Map<String,Object> params);
    
    List<PrpmLossItem> getLossItemByPhoneNo(Map<String,Object> params);

    List<PrpmLossItem> getLossItemList(LossItemRequest request);

    List<PrpmLossItem> selectLossItems(String surveyUserCode, String caseNo, String startDate, String stopDate);

    List<PrpmLossItem> getLossItemByCaseNoLossId(String caseNo, String lossId);

    List<PrpmLossItem> getLossItemByLossUuid(String lossuuid);

    List<PrpmLossItem> selectByUuids(List<String> lossUuids);

    List<PrpmLossItem> getSurveyLossItem(String caseUuid);

    List<PrpmLossItem> getLossItemByMobileLossId(String mobile, String lossId);

    List<PrpmLossItem> selectByCaseNo(Map<String,String> parm);
    
    List<PrpmLossItem> selectLossItemByLossUuids(PrpmLossItem prpmLossItem);
}